from django.db import models


# Create your models here.
class Source(models.Model):
    title = models.CharField(max_length=100, verbose_name='资源标题')
    file_type = models.CharField(max_length=100, verbose_name='文件类型')
    cover_key = models.CharField(max_length=100, verbose_name='视频封面', blank=True, null=True)
    key = models.CharField(max_length=100, verbose_name='资源名称')
    size = models.IntegerField(verbose_name='文件大小')
    publisher = models.CharField(verbose_name='发布人', max_length=100)
    views = models.IntegerField(verbose_name='浏览量', default=0)
    create_time = models.DateField(auto_now_add=True)

    class Meta:
        db_table = 'source'
